Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Raster Imaging Messages


GXRasterPackageBitmap

QuickDraw GX sends the GXRasterPackageBitmap message to translate a portion of a bitmap into a sequence of characters for an output device to print. If you are writing a printing extension or printer driver, you can override the GXRasterPackageBitmap message to perform your own translation from bitmaps into character sequences for your output device. Your override of the GXRasterPackageBitmap message must match the following formal declaration:

OSErr MyRasterPackageBitmap (
                        gxRasterPackageBitmapRec *whattoPackage,
                        Ptr buffer, unsigned long *bufferPos,
                        gxRasterImageDataHdl imageData);
whattoPackage
The bitmap to translate and which part of it to package.
buffer
The buffer for creating the sequence of characters.
bufferPos
The location in the buffer to begin placing characters.
imageData
A pointer to raster imaging-system-specific data. This structure is described in the section "Raster Imaging System Structure" beginning on page 4-23.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX, in its default implementation of the GXRasterDataIn message, sends the GXRasterPackageBitmap message to create a sequence of characters that represent a portion of the bitmap on the device. This message is sent multiple times per bitmap: once for each head pass that is required to print the bitmap, as specified in the raster package ('rpck') resource.

The default implementation of this message does nothing.

You always perform a total override of this message in your raster device driver to provide your own translation from bitmaps into a sequence of characters for the device. After translating part of the bitmap into a sequence of characters and storing this sequence into the buffer, you increment the buffer position (specified in the bufferPos parameter) by the number of bytes added to the buffer.

SPECIAL CONSIDERATIONS
You never send the GXRasterPackageBitmap message yourself.

You can partially override the GXRasterPackageBitmap message in an extension. In a raster device driver, you always totally override this message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The gxRasterPackageBitmapRec data type is described in the section
"Raster Package Bitmap Structure" on page 4-22.

The raster imaging system structure is described on page 4-23.

The raster package control resource type is described on page 6-74 in the chapter "Printing Resources."


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help